/**
 * For testing inheritance of @EventListener annotation and @OnEvent annotation
 */
package aspectjutil.eventmanager.testmodels;

import aspectjutil.adviseutil.Util;
import aspectjutil.eventmanager.EventInfo;
import aspectjutil.eventmanager.label.OnEvent;

public class EventRecipientChild extends EventRecipient {
	
	@Override
	public void onPriceChange( EventInfo eventInfo) {
		EventTraceSupporter.getEventTraceList().add( 
				Util.getCallingMethodInfo( Thread.currentThread().getStackTrace(), 1, 1).get( 0)
				);
		EventTraceSupporter.saveEventInfo( eventInfo);
	}
	
	@OnEvent( value={SampleEventClass.CalculationEvent.class}, turnOnEachEvent={1})
	public static void staticListenerOfCalculationCompletion( EventInfo eventInfo) {
		
		EventTraceSupporter.getEventTraceList().add( 
				Util.getCallingMethodInfo( Thread.currentThread().getStackTrace(), 1, 1).get( 0)
				);
		EventTraceSupporter.saveEventInfo( eventInfo);
	}
	
}